package homework;

class Circle{
    int r ;
    public Circle(){
        this.r = 2;
    }
    public Circle(int r){
        this.r = r;
    }
    void showArea (){
        System.out.println("面积是：" + 3.14 * r * r);
    }
    void showPerimeter(){
        System.out.println("周长是：" + 2 * 3.14 * r);
    }
}
public class TestCircle {
    public static void main(String[] args) {
        Circle circle1 = new Circle();
        Circle circle2 = new Circle(5);
        circle1.showArea();
        circle1.showPerimeter();
        circle2.showArea();
        circle2.showPerimeter();
    }
}
